/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.rbh.risk.dao;

import com.rbh.risk.entity.Privilege;
import com.rbh.risk.entity.Profile;
import com.rbh.risk.entity.RiskData;
import com.rbh.risk.entity.SeverityLevel;
import com.rbh.risk.entity.Workgroup;
import com.rbh.risk.model.SummaryLevelModel;
import com.rbh.risk.model.TopReportModel;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.springframework.dao.DataAccessException;

/**
 *
 * @author M
 */
public interface RiskDataDao {

    public void insert(RiskData risk) throws DataAccessException;

    public void update(RiskData risk) throws DataAccessException;

    public void delete(RiskData risk) throws DataAccessException;

    public RiskData getById(String riskId) throws DataAccessException;

    public List<RiskData> getAll() throws DataAccessException;

    public List<RiskData> getByProfile(HashMap<Privilege, String> privileges, Profile profile, Date dateFrom, Date dateTo) throws DataAccessException;

    public List<SummaryLevelModel> getMajorSummaryLevels(HashMap<Privilege, String> privileges, Profile profile, Date from, Date to) throws DataAccessException;

    public List<SummaryLevelModel> getMinorSummaryLevels(Workgroup workgroup, Date from, Date to) throws DataAccessException;

    public List<RiskData> getRiskDetailList(Workgroup workgroup, SeverityLevel level, Profile profile, Date from, Date to) throws DataAccessException;

    public List<TopReportModel> getTopReport() throws DataAccessException;

    public List<TopReportModel> getTopReport(Integer limit) throws DataAccessException;
    
    public List<RiskData> getByFilter(int first, int pageSize, String sortField, boolean sortOrder, Map<String, String> filters, HashMap<Privilege, String> privileges, Profile profile) throws DataAccessException;
    
    public Integer getMaxResult(Map<String, String> filters, HashMap<Privilege, String> privileges, Profile profile) throws DataAccessException;
}